<template>
  <div>
    <!-- 表格 -->
    <template>
      <el-table
        :data="store"
        style="width: 100%">
        <el-table-column
          :prop="store.result.store_id"
          label="编号"
          align="center"
          width="100">
        </el-table-column>
        <el-table-column
          :prop="store.result.Chinese"
          label="店铺名称"
          align="center"
         >
        </el-table-column>
        <el-table-column
          label="店铺图片"
          align="center"
          width="180">
          <template slot-scope="scope">
            <img v-show="!scope.row.portrait" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" alt="" width="60px">
            <img v-if="imgnone" :src="'http://localhost:3000/images/' +store.result.img" alt="" width="60px">
            <img v-if="imgnone" :src="scope.row.portrait" alt="" width="60px">
          </template>
        </el-table-column>
        <el-table-column
          :prop="store.result.TEL"
          label="电话号"
          align="center">
        </el-table-column>
          <el-table-column width="300px" align="center" label="操作">
          <!-- <template slot-scope="scope">
            <el-button size="small" type="success"  circle icon="el-icon-store" @click="$router.push(`/htlogin/store-details/${scope.row.store_id}`)" ></el-button>
            <el-button size="small" type="primary"  circle icon="el-icon-s-order" @click="$router.push(`/htlogin/sqb-store-details/${scope.row.store_id}`)" ></el-button>
            <el-button size="small" type="danger" circle icon="el-icon-delete" @click="DeleteItem(scope.row.store_id)"></el-button>
          </template>            -->
        </el-table-column>
      </el-table>
    </template>

    <br>
    <!-- 分页 -->
    <el-pagination
      background
      :total=store.total
      :page-size=store.pagesize
      layout=" ->,prev, pager, next,total,jumper"
      @current-change="ChangCurrentPage"
    >
    </el-pagination>
    
  </div>
</template>

<script>
import httpApi from "@/http";
  export default {
    props:{
        title: Object,
        store:Object
     },
     data(){
        return{
          imgnone: true,
        }
     },
     methods:{
        },

      // 页面挂载完毕后，发送请求，加载列表数据
      mounted(){
         if(this.store.result.img == /^(https[^"]*)"/){
            imgnone = false
          }
      }
  }
</script>

<style lang="scss" scoped>

</style>